﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace JetRetail
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                if (System.Diagnostics.Process.GetProcessesByName(Application.ProductName).Length > 1)
                {
                    MessageBox.Show("Приложение уже запущено, запуск второй копии запрещен.", "Jet-Розница", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Application.Exit();
                }
                else
                {
                    Application.Run(new MainForm());
                }
            }
            catch (Exception e)
            {
                //MessageBox.Show(e.Message);
            }
        }
    }
}